package sa.com.sure.ejtimaa.model;

import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.util.Date;

public class MeetingInfo implements Externalizable{

	private int MeetingID;	
	private int SessionID;
	private int MeetingStatusID;
	private int MeetingPlaceID;
	private String Title;
	private Date StartDate;	
	private Date EndDate;	
	private String MeetingNo;
	private String MeetingBrief;
	private int WaitingForAttendeesReply;
	private Date MeetingStatusDateTime;
	private Date CreatedDateTime;	
	private Date UpdatedDateTime;
	
	public MeetingInfo(int MeetingID,int SessionID,int MeetingStatusID,int MeetingPlaceID,String Title, Date StartDate,Date EndDate,String MeetingNo,String MeetingBrief,int WaitingForAttendeesReply,Date MeetingStatusDateTime,Date CreatedDateTime,Date UpdatedDateTime){
    	this.MeetingID = MeetingID;
    	this.SessionID = SessionID;
    	this.MeetingStatusID = MeetingStatusID;
    	this.MeetingPlaceID = MeetingPlaceID;
    	this.Title = Title;
    	this.StartDate = StartDate;
    	this.EndDate = EndDate;
    	this.MeetingNo = MeetingNo;
    	this.MeetingBrief = MeetingBrief;
    	this.WaitingForAttendeesReply = WaitingForAttendeesReply;
    	this.MeetingStatusDateTime = MeetingStatusDateTime;
    	this.CreatedDateTime = CreatedDateTime;
    	this.UpdatedDateTime = UpdatedDateTime;
	}
	
	public MeetingInfo(){
    	this.MeetingID = -1;
    	this.SessionID = -1;
    	this.MeetingStatusID = -1;
    	this.MeetingPlaceID = -1;
    	this.Title = "";
    	this.StartDate = null;
    	this.EndDate = null;
    	this.MeetingNo = "";
    	this.MeetingBrief = "";
    	this.WaitingForAttendeesReply = -1;
    	this.MeetingStatusDateTime = null;
    	this.CreatedDateTime = null;
    	this.UpdatedDateTime = null;
	}
	
	public int GetMeetingID() {
		return MeetingID;
	}

	public void SetMeetingID(int MeetingID) {
		this.MeetingID = MeetingID;
	}
	
	public int GetSessionID() {
		return SessionID;
	}

	public void SetSessionID(int SessionID) {
		this.SessionID = SessionID;
	}	
	
	public int GetMeetingStatusID() {
		return MeetingStatusID;
	}

	public void SetMeetingStatusID(int MeetingStatusID) {
		this.MeetingStatusID = MeetingStatusID;
	}
	
	public int GetMeetingPlaceID() {
		return MeetingPlaceID;
	}

	public void SetMeetingPlaceID(int MeetingPlaceID) {
		this.MeetingPlaceID = MeetingPlaceID;
	}
	
	public String GetTitle() {
		return Title;
	}

	public void SetTitle(String Title) {
		this.Title = Title;
	}
	
	public Date GetStartDate() {
		return StartDate;
	}

	public void SetStartDate(Date StartDate) {
		this.StartDate = StartDate;
	}
	
	public Date GetEndDate() {
		return EndDate;
	}

	public void SetEndDate(Date EndDate) {
		this.EndDate = EndDate;
	}
	
	public String GetMeetingNo() {
		return MeetingNo;
	}

	public void SetMeetingNo(String MeetingNo) {
		this.MeetingNo = MeetingNo;
	}
	
	public String GetMeetingBrief() {
		return MeetingBrief;
	}

	public void SetMeetingBrief(String MeetingBrief) {
		this.MeetingBrief = MeetingBrief;
	}
	
	public int GetWaitingForAttendeesReply() {
		return WaitingForAttendeesReply;
	}

	public void SetWaitingForAttendeesReply(int WaitingForAttendeesReply) {
		this.WaitingForAttendeesReply = WaitingForAttendeesReply;
	}
	
	public Date GetMeetingStatusDateTime() {
		return MeetingStatusDateTime;
	}

	public void SetMeetingStatusDateTime(Date MeetingStatusDateTime) {
		this.MeetingStatusDateTime = MeetingStatusDateTime;
	}
	
	public Date GetCreatedDateTime() {
		return CreatedDateTime;
	}

	public void SetCreatedDateTime(Date CreatedDateTime) {
		this.CreatedDateTime = CreatedDateTime;
	}
	
	public Date GetUpdatedDateTime() {
		return UpdatedDateTime;
	}

	public void SetUpdatedDateTime(Date UpdatedDateTime) {
		this.UpdatedDateTime = UpdatedDateTime;
	}
	

	
	@Override
	public String toString() {
		return this.Title;
	}

	public void readExternal(ObjectInput input) throws IOException,
			ClassNotFoundException {
		
    	this.MeetingID = input.readInt();
    	this.SessionID = input.readInt();
    	this.MeetingStatusID =input.readInt();
    	this.MeetingPlaceID = input.readInt();
    	this.Title = (String) input.readObject();
    	this.StartDate = (Date) input.readObject();
    	this.EndDate =(Date) input.readObject();
    	this.MeetingNo = (String) input.readObject();
    	this.MeetingBrief = (String) input.readObject();
    	this.WaitingForAttendeesReply = input.readInt();
    	this.MeetingStatusDateTime = (Date) input.readObject();
    	this.CreatedDateTime = (Date) input.readObject();
    	this.UpdatedDateTime = (Date) input.readObject();
		
	}

	public void writeExternal(ObjectOutput output) throws IOException {
		output.writeInt(this.MeetingID);
		output.writeInt(this.SessionID);
		output.writeInt(this.MeetingStatusID);
		output.writeInt(this.MeetingPlaceID);
		output.writeObject(this.Title);
		output.writeObject(this.StartDate);
		output.writeObject(this.EndDate);
		output.writeObject(this.MeetingNo);
		output.writeObject(this.MeetingBrief);
		output.writeInt(this.WaitingForAttendeesReply);
		output.writeObject(this.MeetingStatusDateTime);
		output.writeObject(this.CreatedDateTime);
		output.writeObject(this.UpdatedDateTime);
		
	} 
}
